package com.bookmarket.dao;

import com.bookmarket.entity.Btype;
import com.bookmarket.entity.Custom_Discount;
import com.bookmarket.entity.Discount;
import com.bookmarket.entity.Order_Book;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author Chen Zhaoguang
 * @date 2018/1/5 14:28
 */
@Repository("/czgIndexTopDao")
public interface CzgIndexTopDao {

    /**
     * 获取大类型导航
     * @return
     */
    List<Btype> findBtypeAll();

    /**
     * 查询优惠券
     * @return
     */
    List<Discount> getAllDiscount();

    /**
     * 优惠券数量减1
     * @return
     */
    int reEnd(int id);

    /**
     * 领取优惠券

     * @return
     */
    boolean insertCd(int activeId,int customId);

    /**
     * 查询用户是否领取该优惠券
     * @param custom_id
     * @param
     * @return
     */
    List<Integer> getTwoId(int custom_id);
}
